
//  Copyright (C) 2009-2011 Luca Piccioni
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

using System;
using System.Collections.Generic;

using Derm.Render;
using Derm.Scene;

namespace Derm.Ui.Widget
{
	/// <summary>
	/// Base widget class.
	/// </summary>
	/// <remarks>
	/// The Widget class defines a container able to contains additionally widgets.
	/// </remarks>
	public class Widget : RenderGraphNode
	{
		#region Widget Extents

		/// <summary>
		/// Widget width.
		/// </summary>
		public int Width { get { return (mExtents.x); } }

		/// <summary>
		/// Widget height.
		/// </summary>
		public int Height { get { return (mExtents.y); } }

		/// <summary>
		/// Widget extents.
		/// </summary>
		/// <remarks>
		/// A negative value indicates that extents are not yet computed.
		/// </remarks>
		private Vertex2i mExtents = new Vertex2i(-1, -1);
		/// <summary>
		/// Minimum/maximum extents limits.
		/// </summary>
		/// <remarks>
		/// A negative value indicates no limit set.
		/// </remarks>
		private Vertex2i[] mExtentsLimits = new Vertex2i[2] {
			new Vertex2i(-1, -1), new Vertex2i(-1, -1)
		};

		#endregion
	}
}
